home *** CD-ROM | disk | FTP | other *** search
- global gUtilObj, gFileObj, gItemDelimiter, gWindowsPath, gSystemPath, gPrefName, gPrefPath, gFileText, gExeName, gStartTicks
-
- on checkPrefFile fileName, exeName, introLabel, menuLabel
- if objectp(gUtilObj) then
- gUtilObj(mdispose)
- end if
- set gPrefName to fileName
- set gExeName to exeName
- createPrefPath()
- readPrefFile()
- deletePrefFile()
- testVar(introLabel, menuLabel)
- end
-
- on externalButtonAction
- writePrefFile()
- if objectp(gFileObj) then
- gFileObj(mdispose)
- end if
- open(the pathName & "zoombini.exe", "zoom.exe")
- quit()
- end
-
- on createPrefPath
- if objectp(gUtilObj) then
- gUtilObj(mdispose)
- end if
- if the machineType = 256 then
- set gUtilObj to MovUtils(mnew)
- set gItemDelimiter to "\"
- set gWindowsPath to gUtilObj(mGetWindowsPath)
- set gPrefPath to gWindowsPath & gItemDelimiter & gPrefName
- else
- openXLib("MovieUtilities.xobj")
- set gUtilObj to MovieUtilities(mnew)
- set gItemDelimiter to ":"
- set gSystemPath to gUtilObj(mGetSystemPath)
- set gPrefPath to gSystemPath & "Preferences" & gItemDelimiter & gPrefName
- end if
- put "gPrefPath = " & gPrefPath
- end
-
- on writePrefFile
- if objectp(gFileObj) then
- gFileObj(mdispose)
- end if
- set gFileObj to FileIO(mnew, "write", gPrefPath)
- set todayDate to the date
- gFileObj(mWriteString, todayDate)
- gFileObj(mdispose)
- end
-
- on readPrefFile
- if objectp(gFileObj) then
- gFileObj(mdispose)
- end if
- set gFileObj to FileIO(mnew, "read", gPrefPath)
- if objectp(gFileObj) then
- set gFileText to gFileObj(mReadFile)
- put the result
- else
- put "No pref file exists."
- set gFileText to EMPTY
- end if
- if objectp(gFileObj) then
- gFileObj(mdispose)
- end if
- put "gFileText = " & gFileText
- end
-
- on deletePrefFile
- if objectp(gFileObj) then
- gFileObj(mdispose)
- end if
- set gFileObj to FileIO(mnew, "read", gPrefPath)
- if objectp(gFileObj) then
- gFileObj(mDelete)
- end if
- put the result
- end
-
- on testVar introLabel, menuLabel
- if gFileText = EMPTY then
- go(introLabel)
- else
- go(menuLabel)
- end if
- end
-
- on simpleTimer howLong
- if (the ticks - gStartTicks) <= (howLong * 60) then
- play frame the frame
- end if
- end
-